{{Extend "layout"}}
{{Block "title"}}{{"绑定两步验证"|T}}{{/Block}}
{{Block "breadcrumb"}}
{{Super}}
<li><a href="/gauth_bind">{{"绑定两步验证"|T}}</a></li>
{{/Block}}

{{Block "main"}}
<div class="row">
    <div class="col-md-12">
        <div class="block-flat">
          <div class="header">							
            <h3>{{"绑定两步验证"|T}}</h3>
          </div>
          <div class="content">
              {{if Stored.binded}}
              
<div class="alert alert-info alert-white rounded">
	<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
	<div class="icon"><i class="fa fa-info"></i></div>
    {{T "您已经绑定成功。"}}
</div>
              {{else}}
              <form class="form-horizontal group-border-dashed" method="POST">
              <div class="form-group">
                <label class="col-sm-3 control-label">{{"下载APP"|T}}</label>
                <div class="col-sm-6">
                    <span style="padding-top:5px;vertical-align:middle">
                        <a href="http://sj.qq.com/myapp/detail.htm?apkName=com.google.android.apps.authenticator2" target="_blank">下载身份验证器</a>
                    </span>
                </div>
              </div>
              <div class="form-group">
                <label class="col-sm-3 control-label">{{"APP绑定"|T}}</label>
                <div class="col-sm-6">
                    <div class="table-responsive">
                    <table>
                        <thead>
                            <tr>
                                <th width="50%"><span class="label label-primary pull-right">或</span>扫描二维码</th>
                                <th>输入密钥</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td><img src="{{Stored.qrCodeUrl}}" alt=""></td>
                                <td><span style="font-weight:bold;font-size:33px">{{Stored.keyData.Encoded}}</span></td>
                            </tr>
                        </tbody>
                    </table>
                    </div>
                </div>
              </div>
              <!--<div class="form-group">
                <label class="col-sm-3 control-label">{{"账户名"|T}}</label>
                <div class="col-sm-6">
                    <span style="padding-top:5px;vertical-align:middle">{{Stored.user}}</span>
                </div>
              </div>-->
              <div class="form-group">
                <label class="col-sm-3 control-label">{{"验证"|T}}</label>
                <div class="col-sm-6">
                    <input class="form-control" type="text" name="code" value="{{Form "code"}}" required="required" placeholder="{{"验证码"}}">
                    <div class="help-block">{{"在手机App上绑定之后，请在这里输入手机上显示的验证码，验证是否绑定成功"|T}}</div>
                </div>
              </div>
              <div class="form-group">
				<div class="col-sm-6 col-sm-offset-3">
				  <button type="submit" class="btn btn-primary btn-lg"><i class="fa fa-check"></i> {{"验证并绑定"|T}}</button>
				</div>
			    </div>
            </form>
            {{end}}
          </div><!-- /.content -->
        </div><!-- /.block-flat -->
    </div>
</div>
{{/Block}}

{{Block "footer"}}
{{/Block}}